There has been known an information processing apparatus that provides a virtual space and launches an object from a player object set in the virtual space according to an operation of a player. When the object is launched from the player object to a non-player object in the information processing apparatus, if the object is always launched in the front direction of the player object, the object needs to be launched in a state where the front direction of the player object is directed to the direction in which the non-player object is present. Such a directional adjustment of the player object is not easy.
There has been known a player assist function that performs information processing that determines whether a non-player object is present in a predetermined search range in a virtual space and launches an object to the non-player object present in the search range, which is a target. For example, there has been known an information processing apparatus in which in a virtual space where a player object and a non-player object are present, when the non-player object is present in a search range determined by using the location of the player object as a reference, an object is launched from the player object to the non-player object based on an operation of a player.
As an example of such an information processing apparatus, an information processing apparatus that performs a soccer game is disclosed in the prior art disclosed in JP 2001-327751 A. In the soccer game of the prior art, an object having a ball object is set as a player object operated by a player. When an object of the same team is present in a predetermined angular range about the front direction of the player object, the ball object is moved from the player object to the object of the same team according to an input of a ball pass operation by the player.
In the information processing apparatus of the prior art, when a button is strongly pressed in the ball pass operation, the angle of the predetermined angular range is reduced. Consequently, when the button is strongly pressed in the ball pass operation, the ball can be passed to a player object of the same team that is present substantially in the front direction of the player object even if the player object is far away from the player object of the same team. Meanwhile, when the button is weakly pressed in the ball pass operation, the ball can be passed to a player object of the same team near the player object even if the player object of the same team is present in a relatively shifted manner from the front direction of the player object.
In the information processing apparatus of the prior art, however, to move the ball object to an intended target, it is necessary for the player to distinguish operations (distinguish between strong pressing and weak pressing).
An object of the present disclosure is to provide an information processing apparatus and the like that achieve a player assist function that enables a player to naturally set a target of information processing without being conscious to distinguish operations.
A non-transitory storage medium storing an information processing program for controlling at least one processor, wherein the information processing program when executed by the at least one processor causes the at least one processor to: determine a state of a first object in a virtual space; determine a search range for searching for a second object based on a state of the first object; search for whether the second object is present in the search range; and set the second object as a target of predetermined information processing when it is determined that the second object is present in the search range.
With this configuration, the search range for searching for the second object is determined based on the state of the first object and the target of the information processing is set. It is thus possible to provide a player assist function that enables a player to set the target of the information processing without being conscious to distinguish operations.
In the non-transitory storage medium described above, the information processing program may further cause the at least one processor to determine magnitude of a movement input to the first object as a state of the first object.
With this configuration, the search range determination means determines the search range based on the magnitude of a movement input to the first object.
In the non-transitory storage medium described above, the information processing program may further cause the at least one processor to determine magnitude of a positional change of the first object as a state of the first object.
With this configuration, the search range determination means determines the search range based on the magnitude of a positional change of the first object.
In the non-transitory storage medium described above, the information processing program may further cause the at least one processor to determine the search range so as to be continuously or discretely increased as the movement input is smaller.
With this configuration, the search range is determined so as to be continuously or discretely increased as the movement input to the first object is smaller. When the search range determination means determines the search range so as to be discretely increased as the movement input is smaller, the search range determination means may execute two-stage control. In the two-stage control, when there is a movement input to the player object (or when a movement input is equal to or larger than a predetermined threshold), the search range determination unit may set the size of the search range to a first size. When there is no movement input to the player object (or when a movement input is less than a predetermined threshold), the search range determination unit may set the size of the search range to a second size larger than the first size.
In the non-transitory storage medium described above, the information processing program may further cause the at least one processor to determine the search range so as to be continuously or discretely increased as the positional change is smaller.
With this configuration, the search range is determined so as to be continuously or discretely increased as the positional change of the first object is smaller. When the search range determination means determines the search range so as to be discretely increased as the positional change of the first object is smaller, the search range determination means may execute two-stage control. In the two-stage control, when there is a positional change of the first object (or when a positional change is equal to or larger than a predetermined threshold), the search range determination unit may set the size of the search range to a first size. When there is no positional change of the first object (or when a positional change is less than a predetermined threshold), the search range determination unit may set the size of the search range to a second size larger than the first size.
In the non-transitory storage medium described above, the information processing program may further cause the at least one processor to determine magnitude of a change in directional input to the first object as a state of the first object.
With this configuration, the search range determination means determines the search range based on the magnitude of a change in directional input to the first object.
In the non-transitory storage medium described above, the information processing program may further cause the at least one processor to determine magnitude of a directional change of the first object as a state of the first object.
With this configuration, the search range determination means determines the search range based on the magnitude of a directional change of the first object.
In the non-transitory storage medium described above, the information processing program may further cause the at least one processor to determine the search range so as to be continuously or discretely increased as the change in directional input is larger.
With this configuration, the search range is determined so as to be continuously or discretely increased as the change in directional input to the first object is larger. When the search range determination means determines the search range so as to be discretely increased as the change in directional input to the first object is larger, the search range determination means may execute two-stage control. In the two-stage control, when there is no change in directional input to the first object (or when a change in directional input is equal to or less than a predetermined threshold), the search range determination unit may set the size of the search range to a first size. When there is a change in directional input to the first object (or when a change in directional input is larger than a predetermined threshold), the search range determination unit may set the size of the search range to a second size larger than the first size.
In the non-transitory storage medium described above, the information processing program may further cause the at least one processor to determine the search range so as to be continuously or discretely increased as the directional change is larger.
With this configuration, the search range is determined so as to be continuously or discretely increased as the directional change of the first object is larger. When the search range determination means determines the search range so as to be discretely increased as the directional change of the first object is larger, the search range determination means may execute two-stage control. In the two-stage control, when there is no directional change of the first object (or when a directional change is equal to or less than a predetermined threshold), the search range determination unit may set the size of the search range to a first size. When there is a directional change of the first object (or when a directional change is larger than a predetermined threshold), the search range determination unit may set the size of the search range to a second size larger than the first size.
In the non-transitory storage medium described above, the information processing program may further cause the at least one processor to, when it is determined that a plurality of the second objects are present in the search range, set the second object that satisfies a predetermined condition as a target of the information processing.
With this configuration, when the second objects are present in the search range, only a part of the second objects may be set as the target of the information processing.
In the non-transitory storage medium described above, the predetermined condition may be at least a condition based on whether a distance to an imaginary line extending in a front direction of the first object is short.
With this configuration, the second object functioning as the target of the information processing may be set based on the direction of the first object.
In the non-transitory storage medium described above, the information processing program may further cause the at least one processor to determine the search range by using a position and a direction of the first object as a reference.
With this configuration, the search range may be set by using the first object as a reference.
In the non-transitory storage medium described above, the search range is a sector in which a center may be at the first object and a center line of a central angle is a front direction of the first object, and the information processing program may further cause the at least one processor to determine the search range by determining at least one of the central angle of the sector and a radius of the sector based on a state of the first object.
With this configuration, the size of the sector-shaped search range is adjusted based on the state of the first object.
In the non-transitory storage medium described above, the information processing program may further cause the at least one processor to, when it is determined that an input for performing the predetermined information processing is made, determine the search range.
With this configuration, the search range is determined when an instruction to perform the information processing is made, that is, when the second object needs to be searched for.
In the non-transitory storage medium described above, the information processing program may further cause the at least one processor to perform information processing of launching a third object from the first object to the target as the predetermined information processing.
With this configuration, it is possible to launch the third object to the second object that is present in the search range determined based on the state of the first object.
In the non-transitory storage medium described above, the information processing program may further cause the at least one processor to, when it is determined that the second object is not present in the search range, launch the third object in a front direction of the first object.
With this configuration, when the second object functioning as the target of the information processing is not present, it is possible to launch the third object in the front direction of the first object.
In the non-transitory storage medium described above, the information processing program may further cause the at least one processor to, when it is determined that an input for changing a course of the third object having been launched is made, set a position of the third object as a reference and determines the search range according to the input for changing the course.
With this configuration, the search range is determined based on the input for changing the course of the third object having been launched.
In the non-transitory storage medium described above, the first object may be a player object that is operated by a player.
With this configuration, the second object functioning as the target of the predetermined information processing can be searched for based on the state of the player object.
In the non-transitory storage medium described above, the first object may be a player object that is operated by a player, and the information processing program may further cause the at least one processor to change an object functioning as a player object from the first object to the second object determined as the target after the predetermined information processing.
With this configuration, it is possible to achieve a game effect in which the second object determined as the target is possessed by the player object.
An information processing apparatus comprising at least one processor, the at least one processor configured to: determine a state of a first object in a virtual space; determine a search range for searching for a second object based on a state of the first object; search for whether the second object is present in the search range; and set the second object as a target of predetermined information processing when it is determined that the second object is present in the search range.
With this configuration, the search range for searching for the second object is determined based on the state of the first object and the target of the information processing is set. It is thus possible to provide a player assist function that enables a player to set the target of the information processing without being conscious to distinguish operations.
An information processing method comprising: determining a state of a first object in a virtual space; determining a search range for searching for a second object based on a state of the first object; searching for whether the second object is present in the search range; and setting the second object as a target of predetermined information processing when it is determined that the second object is present in the search range.
With this configuration, the search range for searching for the second object is determined based on the state of the first object and the target of the information processing is set. It is thus possible to provide a player assist function that enables a player to set the target of the information processing without being conscious to distinguish operations.
An information processing system comprising at least one processor, the at least one processor configured to: determine a state of a first object in a virtual space; determine a search range for searching for a second object based on a state of the first object; search for whether the second object is present in the search range; and set the second object as a target of predetermined information processing when it is determined that the second object is present in the search range.
With this configuration, the search range for searching for the second object is determined based on the state of the first object and the target of the information processing is set. It is thus possible to provide a player assist function that enables a player to set the target of the information processing without being conscious to distinguish operations.
The foregoing and other objects, features, aspects and advantages of the exemplary embodiments will become more apparent from the following detailed description of the exemplary embodiments when taken in conjunction with the accompanying drawings.